﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XmlDSigEx
{
    class DigestProvider:IDigestProvider
    {
        public IDigestAlgorithm GetDigest(string uri)
        {
            return new CryptoConfigDigestAlgorithm(uri);
        }

        public bool CanHandle(string uri)
        {
            return uri == CryptoConfigDigestAlgorithm.URI_DIGEST_SHA1
                || uri == CryptoConfigDigestAlgorithm.URI_DIGEST_SHA256
                || uri == CryptoConfigDigestAlgorithm.URI_DIGEST_SHA512;
        }
    }
}
